﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Graph
{
    enum VertexColor
    {
        WHITE,
        GRAY,
        BLACK
    }

    class Vertex
    {
        public string Label
        {
            get
            {
                return label;
            }
            set
            {
                label = value;
            }
        }

        public int Key
        {
            get { return key; }
            set { key = value; }
        }

        public int D
        {
            get { return d; }
            set { d = value; }
        }
        public int F
        {
            get { return f; }
            set { f = value; }
        }
        public VertexColor Color
        {
            get { return color; }
            set { color = value; }
        }
        public Vertex Father
        {
            get { return father; }
            set { father = value; }
        }

        public Vertex(string label, int key)
        {
            this.label = label;
            this.key = key;
            this.color = VertexColor.WHITE;
            this.father = null;
            this.d = 0;
            this.f = 0;
        }
        public bool equal(Vertex v)
        {
            if (v == null) return false;
            bool ret = this.Key == v.Key && this.Label.Equals(v.Label);
            return ret;
        }

        private string label;
        private int key;
        private Vertex father;
        private int d;
        private int f;
        private VertexColor color;
    }
}
